import CodeBlock from '@theme/CodeBlock';

:::tip Conditional Dependencies

Use `null` as the second argument to any <abbr title="Reactive Data Client">Data Client</abbr> hook means "do nothing."

<CodeBlock
  language="typescript">
  {`// todo could be undefined if id is undefined
const todo = ${props.hook ?? 'useSuspense'}(TodoResource.get, id ? { id } : null);`}
</CodeBlock>

:::
